package com.cqie.secondhandtransaction.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.cqie.secondhandtransaction.DTO.AccessUserDTO;
import com.cqie.secondhandtransaction.DTO.UserDetailsDTO;
import com.cqie.secondhandtransaction.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author gdy
 * @since 2025-02-10
 */
@Getter
@Setter
@TableName("access_info")
@ApiModel(value = "AccessInfo对象", description = "")
public class AccessInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("评价星级1")
    private Integer descScore;

    @ApiModelProperty("评价星级2")
    private Integer serviceScore;

    @ApiModelProperty("评价星级3")
    private Integer qualityScore;

    @ApiModelProperty("评价照片")
    private String picture;

    @ApiModelProperty("评价内容")
    private String description;

    @ApiModelProperty("买家id")
    private Integer userId;

    @ApiModelProperty("商品id")
    private Integer productId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = DateUtil.DATETIME_FORMAT)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = DateUtil.DATETIME_FORMAT)
    private Date updateTime;

    @ApiModelProperty("删除标识")
    @TableLogic
    private Integer isDelete;

    @ApiModelProperty("删除时间")
    private Date deleteTime;

    @TableField(exist = false)
    private AccessUserDTO userInfo;


}
